<template>
	<view class="store">
		<view class="main">
			<view class="title">{{ initData.storeName }}</view>
			<view class="p">联系人：{{ initData.chargeMan }}</view>
			<view class="p">联系电话：{{ initData.storeContact }}</view>
			<view class="p">地址：{{ initData.province }}{{ initData.city }}{{ initData.region }}{{ initData.town }}{{ initData.storeAddr }}</view>
			<view class="img"><image src="/static/img/logo2.png" mode="widthFix" /></view>
		</view>
	</view>
</template>
<script>
import { uniIcons } from '@dcloudio/uni-ui';
import store from '../../../servers/my/store.js';
export default {
	components: { uniIcons },
	data() {
		return {
			initData: '',
			id:''
		};
	},
	onLoad(option) {
		this.id=option.shopstore_detail
		this.getDate(this.id);
	},
	mounted() {
		// this.id = uni.getStorageSync('shopstore_detail')||this.$route.query.shopstore_detail
		// this.id=this.commonality.route_get('shopstore_detail', this.$route);

		// if(this.id){
			
		// }
	},
	methods: {
		getDate(id) {
			store
				.selectDetails(id)
				.then(res => {
					console.log(res)
					this.initData = res.data;
					this.initData.image = this.imgCDNUrl + this.initData.doorPhoto;
				})
				.catch(err => {
					console.log(err)
					console.log(new Error('请检查网络后重试'));
				});
		}
	}
};
</script>
<style lang="less" scoped>
page {
	background: #ffffff;
}
.store {
	height: 100%;
	background: #fff;
	.main {
		// position: absolute;
		// top: 80rpx;
		// bottom: 0;
		// width: 100%;
		// overflow: auto;
		padding: 20rpx;
		box-sizing: border-box;
		.title {
			font-size: 32rpx;
			text-align: center;
			padding: 20rpx 0;
		}
		.p {
			line-height: 65rpx;
			font-size: 26rpx;
			margin-top: 20rpx;
		}
		.img {
			image {
				width: 100%;
				margin-bottom: 26rpx;
			}
		}
	}
}
</style>
